cmake_minimum_required( VERSION 3.7.1 )

project( ffc-executable-libreoffice-cppunit C CXX ) # [JSD] change this name in the copy (!)


JSD_SHOW_PROJECT_HEADER()


include( ffc-executable-set-compiler-settings ) # [JSD] change this name in the copy (!)


##  this project headers and sources enumeration section
set( project_adhoc_directory ${JSD_FFC_ADHOC_PATH} )
set( project_adhoc_headers ${project_adhoc_directory}/*.h* )
set( project_adhoc_sources ${project_adhoc_directory}/*.c* )
set( project_source_directory ${JSD_FFC_SOURCE_ROOT_PATH}/ffc_executable )
set( project_headers ${project_source_directory}/*.h* )
set( project_sources ${project_source_directory}/*.c* )
set( project_source_main_directory ${project_source_directory}_main )
set( project_main_headers ${project_source_main_directory}/*.h* )
set( project_main_sources ${project_source_main_directory}/*.c* )

file( GLOB_RECURSE project_headers_and_sources
	${project_adhoc_headers}
	${project_adhoc_sources}
	${project_headers}
	${project_sources}
	${project_main_headers}
	${project_main_sources}
)

add_executable( ${PROJECT_NAME} ${project_headers_and_sources} )
## ~this project headers and sources enumeration section


##  project and target definition section
set_target_properties(
	${PROJECT_NAME}
		PROPERTIES
			POSITION_INDEPENDENT_CODE ON # required to be able to be linked into shared libraries.
			VERSION 0.1.0
			SOVERSION 0.1
#			DEFINE_SYMBOL
)

set( project_private_definitions
	)
JSD_REPLACE_DASH_WITH_UNDERSCORE_INPLACE( project_private_definitions )
JSD_TO_UPPER_INPLACE( project_private_definitions )

target_compile_definitions(
	${PROJECT_NAME}
		PRIVATE
			${project_private_definitions}
)

target_link_libraries(
	${PROJECT_NAME}
		PRIVATE
		    ffc-derived-library-libreoffice-cppunit
)
## ~project and target definition section


##  target include directories
target_include_directories(
	${PROJECT_NAME}
		PRIVATE
			${project_source_directory}
)
## ~target include directories


JSD_SHOW_PROJECT_FOOTER()
